-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor: 프리뷰 사용하는 부분 통합 #311
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다 :)
} | ||
|
||
@Override | ||
public Optional<Post> findTopByTeamAndPostIdLessThanOrderByCreatedAtDescPostIdDesc(Team findTeam, Long postId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boolean isGreaterThan 파라미터를 추가적으로 받아서 postId 대소 비교 결과만 다른 두 쿼리를 하나로 합치는 게 어떨까요??
} | ||
|
||
@Override | ||
public Optional<Post> findTopByMemberAndPostIdLessThanOrderByCreatedAtDescPostIdDesc(Member member, Long postId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 쿼리도 마찬가지로 합치면 어떨까요??
@@ -318,4 +314,115 @@ private BooleanBuilder searchBy(String authorName, String teamName, String proje | |||
} | |||
return new BooleanBuilder(); | |||
} | |||
|
|||
@Override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
참고로 @OverRide는 사용하지 않아도 됩니다!
@@ -16,17 +16,26 @@ public class PostResponseDTO { | |||
@Builder | |||
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) | |||
@JsonInclude(JsonInclude.Include.NON_NULL) | |||
public record SimplePostResponseDTO( | |||
public record PostPreviewDTO( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DTO 통합하니 훨씬 좋네요 👍
#️⃣연관된 이슈
📝작업 내용
프리뷰 사용되는 부분 DTO 통합했습니다
해당 과정에서 발행할 수 있는 영속성 컨텍스트 문제 해결해주었습니다.